﻿using System.Runtime.Serialization;

namespace RemoteTestRunner.Contracts
{
    [DataContract]
    public class DataSourceInfo
    {
        /// <summary>
        ///   Gets or sets the name of the data source.
        /// </summary>
        /// <value>The name of the data source.</value>
        /// <remarks>
        ///   This maps to the <c>name</c> attribute within the <c>dataSources</c> 
        ///   element.
        /// </remarks>
        [DataMember]
        public string Name { get; set; }

        /// <summary>
        ///   Gets or sets the name of the connection string associated with the data source.
        /// </summary>
        /// <value>The name of the connection string associated with the data source.</value>
        /// <remarks>
        ///   This maps to the <c>connectionString</c> attribute within the 
        ///   <c>dataSources</c> element.
        /// </remarks>
        [DataMember]
        public string ConnectionStringName { get; set; }

        /// <summary>
        ///   Gets or sets the name of the data table to be used within the data source.
        /// </summary>
        /// <value>The name of the data table to be used within the data source.</value>
        /// <remarks>
        ///   This maps to the <c>dataTableName</c> attribute within the <c>dataSources</c>
        ///   element.
        /// </remarks>
        [DataMember]
        public string DataTableName { get; set; }

        /// <summary>
        ///   Gets or sets the data access method to be used by the data-driven unit tests.
        /// </summary>
        /// <value>The data access method to be used by the data-driven unit tests.</value>
        /// <remarks>
        ///   This maps to the <c>dataAccessMethod</c> attribute within the 
        ///   <c>dataSources</c> element.
        /// </remarks>
        [DataMember]
        public string DataAccessMethod { get; set; }

        /// <summary>
        ///   Gets or sets the base location of the data source.  If this value is specified, then
        ///   the data source will be copied from this location before running any associated tests.
        /// </summary>
        /// <value>The base location of the data source.</value>
        /// <remarks>
        ///   This maps to the <c>dataSourceBaseUri</c> attribute within the 
        ///   <c>dataSources</c> element.
        /// </remarks>
        [DataMember]
        public string DataSourceBaseUri { get; set; }

        /// <summary>
        ///   Gets or sets the path of the data source.
        /// </summary>
        /// <value>The path of the data source.</value>
        /// <remarks>
        ///   This maps to the <c>Data Source</c> tag located within the 
        ///   <c>connectionStrings</c> element.
        /// </remarks>
        [DataMember]
        public string DataSourcePath { get; set; }
    }
}